<html><head><meta charset="utf-8"/><title>测试报告</title><link rel="stylesheet" type="text/css" href="C:\job\React\sqtracker_2\group-11--pt-site-front-end\node_modules\jest-html-reporter\style\defaultTheme.css"/></head><body><main class="jesthtml-content"><header><h1 id="title">测试报告</h1></header><section id="metadata-container"><div id="timestamp">Started: 2025-06-14 22:28:41</div><div id="summary"><div id="suite-summary"><div class="summary-total">Suites (23)</div><div class="summary-passed ">23 passed</div><div class="summary-failed  summary-empty">0 failed</div><div class="summary-pending  summary-empty">0 pending</div></div><div id="test-summary"><div class="summary-total">Tests (271)</div><div class="summary-passed ">271 passed</div><div class="summary-failed  summary-empty">0 failed</div><div class="summary-pending  summary-empty">0 pending</div></div></div></section><details id="suite-1" class="suite-container" open=""><summary class="suite-info"><div class="suite-path">C:\job\React\sqtracker_2\group-11--pt-site-front-end\api\tests\UnitTest\controllers\announcement.test.js</div><div class="suite-time">1.181s</div></summary><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">公告创建测试</div><div class="test-title">管理员成功创建公告</div><div class="test-status">passed</div><div class="test-duration">0.004s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">公告创建测试</div><div class="test-title">非管理员不能创建公告</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">公告创建测试</div><div class="test-title">slug重复</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">公告获取测试</div><div class="test-title">成功获取公告</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">公告获取测试</div><div class="test-title">公告不存在</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">公告获取测试</div><div class="test-title">发生错误时调用 next</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">公告获取列表测试</div><div class="test-title">成功获取公告列表 - 默认参数</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">公告获取列表测试</div><div class="test-title">成功获取公告列表 - 自定义分页参数</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">公告获取列表测试</div><div class="test-title">成功获取公告列表 - 限制最大数量为100</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">公告获取列表测试</div><div class="test-title">发生错误时调用 next</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">获取置顶公告测试</div><div class="test-title">成功获取置顶公告列表</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">获取置顶公告测试</div><div class="test-title">没有置顶公告时返回空数组</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">获取置顶公告测试</div><div class="test-title">发生错误时调用 next</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">获取最新公告测试</div><div class="test-title">成功获取最新公告</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">获取最新公告测试</div><div class="test-title">没有公告时返回404</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">获取最新公告测试</div><div class="test-title">发生错误时调用 next</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">删除公告测试</div><div class="test-title">管理员成功删除公告</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">删除公告测试</div><div class="test-title">非管理员不能删除公告</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">删除公告测试</div><div class="test-title">发生错误时调用 next</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">置顶/取消置顶公告测试</div><div class="test-title">成功置顶公告</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">置顶/取消置顶公告测试</div><div class="test-title">成功取消置顶公告</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">置顶/取消置顶公告测试</div><div class="test-title">发生错误时调用 next</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">编辑公告测试</div><div class="test-title">管理员成功编辑公告</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">编辑公告测试</div><div class="test-title">非管理员不能编辑公告</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">编辑公告测试</div><div class="test-title">缺少必要字段时返回400</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">编辑公告测试</div><div class="test-title">发生错误时调用 next</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">添加评论测试</div><div class="test-title">成功添加评论</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">添加评论测试</div><div class="test-title">公告不存在时返回404</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">添加评论测试</div><div class="test-title">公告不允许评论时返回403</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">添加评论测试</div><div class="test-title">缺少评论内容时返回400</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">添加评论测试</div><div class="test-title">发生错误时调用 next</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div></div></details><details id="suite-2" class="suite-container" open=""><summary class="suite-info"><div class="suite-path">C:\job\React\sqtracker_2\group-11--pt-site-front-end\api\tests\UnitTest\controllers\request.test.js</div><div class="suite-time">1.194s</div></summary><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">createRequest 函数测试</div><div class="test-title">成功创建请求</div><div class="test-status">passed</div><div class="test-duration">0.005s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">createRequest 函数测试</div><div class="test-title">缺少标题时返回400</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">createRequest 函数测试</div><div class="test-title">缺少内容时返回400</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">createRequest 函数测试</div><div class="test-title">处理保存错误并调用next</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">createRequest 函数测试</div><div class="test-title">处理计数错误并调用next</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getRequests 函数测试</div><div class="test-title">成功获取请求列表</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getRequests 函数测试</div><div class="test-title">处理无效的分页参数</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getRequests 函数测试</div><div class="test-title">处理分页参数</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getRequests 函数测试</div><div class="test-title">处理数据库错误</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">fetchRequest 函数测试</div><div class="test-title">成功获取单个请求详情</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">fetchRequest 函数测试</div><div class="test-title">请求不存在时返回404</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">fetchRequest 函数测试</div><div class="test-title">处理无效的请求索引</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">fetchRequest 函数测试</div><div class="test-title">处理数据库错误</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">deleteRequest 函数测试</div><div class="test-title">成功删除请求</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">deleteRequest 函数测试</div><div class="test-title">无权限删除时返回401</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">deleteRequest 函数测试</div><div class="test-title">请求不存在时抛出错误</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">deleteRequest 函数测试</div><div class="test-title">处理无效的请求索引</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">deleteRequest 函数测试</div><div class="test-title">处理数据库错误</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">addComment 函数测试</div><div class="test-title">成功添加评论</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">addComment 函数测试</div><div class="test-title">请求不存在时返回404</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">addComment 函数测试</div><div class="test-title">缺少评论内容时返回400</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">addComment 函数测试</div><div class="test-title">处理数据库错误</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">addCandidate 函数测试</div><div class="test-title">成功添加候选种子</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">addCandidate 函数测试</div><div class="test-title">种子不存在时返回404</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">addCandidate 函数测试</div><div class="test-title">种子已被建议时返回409</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">addCandidate 函数测试</div><div class="test-title">缺少 infoHash 时返回400</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">addCandidate 函数测试</div><div class="test-title">处理数据库错误</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">acceptCandidate 函数测试</div><div class="test-title">成功接受候选种子</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">acceptCandidate 函数测试</div><div class="test-title">无权限接受时返回401</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">acceptCandidate 函数测试</div><div class="test-title">种子未被建议时返回403</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">acceptCandidate 函数测试</div><div class="test-title">缺少 infoHash 时返回400</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">acceptCandidate 函数测试</div><div class="test-title">处理数据库错误</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">acceptCandidate 函数测试</div><div class="test-title">建议者上传种子时获得双倍积分</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div></div></details><details id="suite-3" class="suite-container" open=""><summary class="suite-info"><div class="suite-path">C:\job\React\sqtracker_2\group-11--pt-site-front-end\api\tests\UnitTest\controllers\recommendation.test.js</div><div class="suite-time">0.659s</div></summary><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">Recommendation Controller &gt; getRecommendations</div><div class="test-title">should return recommendations when user exists and onboarding is completed</div><div class="test-status">passed</div><div class="test-duration">0.002s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Recommendation Controller &gt; getRecommendations</div><div class="test-title">should return needsOnboarding when user has not completed onboarding</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Recommendation Controller &gt; getRecommendations</div><div class="test-title">should return 404 when user does not exist</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Recommendation Controller &gt; getRecommendations</div><div class="test-title">should handle errors and return 500 status</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Recommendation Controller &gt; getSimilarRecommendations</div><div class="test-title">should return similar recommendations successfully</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Recommendation Controller &gt; getSimilarRecommendations</div><div class="test-title">should use default count when not specified</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Recommendation Controller &gt; getSimilarRecommendations</div><div class="test-title">should handle errors and return 500 status</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Recommendation Controller &gt; getSimilarRecommendations</div><div class="test-title">should handle invalid count parameter</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Recommendation Controller &gt; onboardUser</div><div class="test-title">should successfully save preferences and return recommendations</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Recommendation Controller &gt; onboardUser</div><div class="test-title">should return 400 when preferences are missing</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Recommendation Controller &gt; onboardUser</div><div class="test-title">should return 404 when user does not exist</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Recommendation Controller &gt; onboardUser</div><div class="test-title">should continue even if preference service fails</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Recommendation Controller &gt; onboardUser</div><div class="test-title">should handle database update failure</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Recommendation Controller &gt; onboardUser</div><div class="test-title">should handle recommendation service failure gracefully</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div></div></details><details id="suite-4" class="suite-container" open=""><summary class="suite-info"><div class="suite-path">C:\job\React\sqtracker_2\group-11--pt-site-front-end\api\tests\UnitTest\tracker\announce.test.js</div><div class="suite-time">1.228s</div></summary><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">announce.js utility functions &gt; binaryToHex</div><div class="test-title">should convert binary string to hex string</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">announce.js utility functions &gt; binaryToHex</div><div class="test-title">should handle empty string</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">announce.js utility functions &gt; binaryToHex</div><div class="test-title">should handle special characters</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">announce.js utility functions &gt; hexToBinary</div><div class="test-title">should convert hex string to binary string</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">announce.js utility functions &gt; hexToBinary</div><div class="test-title">should handle empty string</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">announce.js utility functions &gt; hexToBinary</div><div class="test-title">should handle special characters</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">announce.js utility functions &gt; hexToBinary</div><div class="test-title">should be inverse of binaryToHex</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div></div></details><details id="suite-5" class="suite-container" open=""><summary class="suite-info"><div class="suite-path">C:\job\React\sqtracker_2\group-11--pt-site-front-end\api\tests\UnitTest\tracker\routes.test.js</div><div class="suite-time">0.578s</div></summary><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">createTrackerRoute</div><div class="test-title">should handle onRequest error</div><div class="test-status">passed</div><div class="test-duration">0.002s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">createTrackerRoute</div><div class="test-title">should handle successful onRequest</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">createTrackerRoute</div><div class="test-title">should handle announce action</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">createTrackerRoute</div><div class="test-title">should handle x-forwarded-for header correctly</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">createTrackerRoute</div><div class="test-title">should handle parseHttpRequest error</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">createTrackerRoute</div><div class="test-title">should add interval fields for announce action</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div></div></details><details id="suite-6" class="suite-container" open=""><summary class="suite-info"><div class="suite-path">C:\job\React\sqtracker_2\group-11--pt-site-front-end\api\tests\UnitTest\middleware\auth.test.js</div><div class="suite-time">0.587s</div></summary><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">Auth Middleware &gt; JWT Authentication</div><div class="test-title">should authenticate user with valid token</div><div class="test-status">passed</div><div class="test-duration">0.003s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Auth Middleware &gt; JWT Authentication</div><div class="test-title">should reject banned users</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Auth Middleware &gt; JWT Authentication</div><div class="test-title">should handle invalid token</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Auth Middleware &gt; JWT Authentication</div><div class="test-title">should handle non-existent user</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Auth Middleware &gt; Public Access</div><div class="test-title">should allow public access with correct headers</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Auth Middleware &gt; Public Access</div><div class="test-title">should reject public access with incorrect server secret</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Auth Middleware &gt; No Authentication</div><div class="test-title">should reject request with no authentication</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div></div></details><details id="suite-7" class="suite-container" open=""><summary class="suite-info"><div class="suite-path">C:\job\React\sqtracker_2\group-11--pt-site-front-end\api\tests\UnitTest\controllers\scoringController.test.js</div><div class="suite-time">0.571s</div></summary><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">Scoring Controller</div><div class="test-title">should successfully update all torrent scores</div><div class="test-status">passed</div><div class="test-duration">0.002s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Scoring Controller</div><div class="test-title">should handle individual torrent update failures</div><div class="test-status">passed</div><div class="test-duration">0.003s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Scoring Controller</div><div class="test-title">should handle empty torrent list</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Scoring Controller</div><div class="test-title">should handle database find error</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Scoring Controller</div><div class="test-title">should handle large number of torrents</div><div class="test-status">passed</div><div class="test-duration">0.005s</div></div></div></div></details><details id="suite-8" class="suite-container" open=""><summary class="suite-info"><div class="suite-path">C:\job\React\sqtracker_2\group-11--pt-site-front-end\api\tests\UnitTest\controllers\rss.test.js</div><div class="suite-time">0.412s</div></summary><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">rssFeed 函数测试</div><div class="test-title">成功获取 RSS feed</div><div class="test-status">passed</div><div class="test-duration">0.003s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">rssFeed 函数测试</div><div class="test-title">用户验证失败时返回401</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">rssFeed 函数测试</div><div class="test-title">密码验证失败时返回401</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">rssFeed 函数测试</div><div class="test-title">有查询参数时搜索特定种子</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">rssFeed 函数测试</div><div class="test-title">发生错误时调用next</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div></div></details><details id="suite-9" class="suite-container" open=""><summary class="suite-info"><div class="suite-path">C:\job\React\sqtracker_2\group-11--pt-site-front-end\api\tests\UnitTest\controllers\user.test.js</div><div class="suite-time">0.508s</div></summary><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">sendVerificationEmail 函数测试</div><div class="test-title">成功发送验证邮件</div><div class="test-status">passed</div><div class="test-duration">0.003s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">sendVerificationEmail 函数测试</div><div class="test-title">处理邮件发送错误</div><div class="test-status">passed</div><div class="test-duration">0.006s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">sendVerificationEmail 函数测试</div><div class="test-title">验证邮件内容格式</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">sendVerificationEmail 函数测试</div><div class="test-title">验证发件人信息</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div></div></details><details id="suite-10" class="suite-container" open=""><summary class="suite-info"><div class="suite-path">C:\job\React\sqtracker_2\group-11--pt-site-front-end\api\tests\UnitTest\scheduler\scoringUpdater.test.js</div><div class="suite-time">0.574s</div></summary><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">Score Updater Scheduler</div><div class="test-title">should initialize the scheduler</div><div class="test-status">passed</div><div class="test-duration">0.003s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Score Updater Scheduler</div><div class="test-title">should run update task after initial delay</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Score Updater Scheduler</div><div class="test-title">should handle update task errors gracefully</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Score Updater Scheduler</div><div class="test-title">should not run multiple update tasks simultaneously</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Score Updater Scheduler</div><div class="test-title">should run update task periodically</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div></div></details><details id="suite-11" class="suite-container" open=""><summary class="suite-info"><div class="suite-path">C:\job\React\sqtracker_2\group-11--pt-site-front-end\api\tests\UnitTest\utils\validateConfig.test.js</div><div class="suite-time">0.542s</div></summary><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">validateConfig</div><div class="test-title">should validate correct configuration</div><div class="test-status">passed</div><div class="test-duration">0.009s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">validateConfig</div><div class="test-title">should handle disabled email configuration</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">validateConfig</div><div class="test-title">should reject invalid configuration</div><div class="test-status">passed</div><div class="test-duration">0.002s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">validateConfig</div><div class="test-title">should reject invalid email configuration when email is enabled</div><div class="test-status">passed</div><div class="test-duration">0.002s</div></div></div></div></details><details id="suite-12" class="suite-container" open=""><summary class="suite-info"><div class="suite-path">C:\job\React\sqtracker_2\group-11--pt-site-front-end\api\tests\UnitTest\utils\hitnrun.test.js</div><div class="suite-time">0.405s</div></summary><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">getUserHitNRuns</div><div class="test-title">should return correct number of hit and runs</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getUserHitNRuns</div><div class="test-title">should return 0 when no hit and runs found</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getUserHitNRuns</div><div class="test-title">should only count records with left = 0</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getUserHitNRuns</div><div class="test-title">should handle missing uploaded or downloaded fields</div><div class="test-status">passed</div><div class="test-duration">0.003s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getUserHitNRuns</div><div class="test-title">should handle null response from database</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getUserHitNRuns</div><div class="test-title">should call find with correct parameters</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getUserHitNRuns</div><div class="test-title">should handle zero values correctly</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div></div></details><details id="suite-13" class="suite-container" open=""><summary class="suite-info"><div class="suite-path">C:\job\React\sqtracker_2\group-11--pt-site-front-end\api\tests\UnitTest\controllers\moderation.test.js</div><div class="suite-time">0.423s</div></summary><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">createReport 函数测试</div><div class="test-title">成功创建举报</div><div class="test-status">passed</div><div class="test-duration">0.002s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">createReport 函数测试</div><div class="test-title">种子不存在时返回 404</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">createReport 函数测试</div><div class="test-title">没有提供举报原因时返回 400</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">createReport 函数测试</div><div class="test-title">保存举报失败时调用 next</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">fetchReport 函数测试</div><div class="test-title">成功获取举报信息</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">fetchReport 函数测试</div><div class="test-title">非管理员访问时返回 401</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">fetchReport 函数测试</div><div class="test-title">举报不存在时返回 404</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">fetchReport 函数测试</div><div class="test-title">发生错误时调用 next</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getReports 函数测试</div><div class="test-title">成功获取举报列表</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getReports 函数测试</div><div class="test-title">非管理员访问时返回401</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getReports 函数测试</div><div class="test-title">发生错误时调用next</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">setReportResolved 函数测试</div><div class="test-title">成功设置举报为已解决</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">setReportResolved 函数测试</div><div class="test-title">非管理员访问时返回401</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">setReportResolved 函数测试</div><div class="test-title">发生错误时调用next</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getStats 函数测试</div><div class="test-title">永真</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getStats 函数测试</div><div class="test-title">成功获取统计数据</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getStats 函数测试</div><div class="test-title">非管理员访问时返回401</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getStats 函数测试</div><div class="test-title">发生错误时调用next</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div></div></details><details id="suite-14" class="suite-container" open=""><summary class="suite-info"><div class="suite-path">C:\job\React\sqtracker_2\group-11--pt-site-front-end\api\tests\UnitTest\controllers\rating.test.js</div><div class="suite-time">0.365s</div></summary><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">Rating Controller &gt; createOrUpdateRating</div><div class="test-title">should create a new rating successfully</div><div class="test-status">passed</div><div class="test-duration">0.002s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Rating Controller &gt; createOrUpdateRating</div><div class="test-title">should return 400 for invalid score</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Rating Controller &gt; getTorrentRatings</div><div class="test-title">should get all ratings for a torrent</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Rating Controller &gt; getUserRatings</div><div class="test-title">should get all ratings by a user</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Rating Controller &gt; getUserRatingForTorrent</div><div class="test-title">should get user rating for specific torrent</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Rating Controller &gt; getUserRatingForTorrent</div><div class="test-title">should return 404 when rating not found</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Rating Controller &gt; getTorrentRatingStats</div><div class="test-title">should get rating statistics for a torrent</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Rating Controller &gt; deleteRating</div><div class="test-title">should allow user to delete their own rating</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Rating Controller &gt; deleteRating</div><div class="test-title">should return 403 when user tries to delete others rating</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div></div></details><details id="suite-15" class="suite-container" open=""><summary class="suite-info"><div class="suite-path">C:\job\React\sqtracker_2\group-11--pt-site-front-end\api\tests\UnitTest\controllers\ratingController.test.js</div><div class="suite-time">0.415s</div></summary><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">createOrUpdateRating 函数测试</div><div class="test-title">成功创建评分</div><div class="test-status">passed</div><div class="test-duration">0.004s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">createOrUpdateRating 函数测试</div><div class="test-title">评分超出范围时返回错误</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">createOrUpdateRating 函数测试</div><div class="test-title">评分小于1时返回错误</div><div class="test-status">passed</div><div class="test-duration">0.002s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">createOrUpdateRating 函数测试</div><div class="test-title">数据库操作失败时返回错误</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getTorrentRatings 函数测试</div><div class="test-title">成功获取种子评分列表</div><div class="test-status">passed</div><div class="test-duration">0.002s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getTorrentRatings 函数测试</div><div class="test-title">当没有评分时返回空数组</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getTorrentRatings 函数测试</div><div class="test-title">数据库操作失败时返回错误</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getUserRatings 函数测试</div><div class="test-title">成功获取用户评分列表</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getUserRatings 函数测试</div><div class="test-title">当用户没有评分时返回空数组</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getUserRatings 函数测试</div><div class="test-title">数据库操作失败时返回错误</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getUserRatingForTorrent 函数测试</div><div class="test-title">成功获取用户对特定种子的评分</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getUserRatingForTorrent 函数测试</div><div class="test-title">当评分不存在时返回404错误</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getUserRatingForTorrent 函数测试</div><div class="test-title">数据库操作失败时返回错误</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getTorrentRatingStats 函数测试</div><div class="test-title">成功获取种子评分统计</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getTorrentRatingStats 函数测试</div><div class="test-title">当没有评分时返回默认统计</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getTorrentRatingStats 函数测试</div><div class="test-title">数据库操作失败时返回错误</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">deleteRating 函数测试</div><div class="test-title">评分作者成功删除评分</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">deleteRating 函数测试</div><div class="test-title">管理员成功删除评分</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">deleteRating 函数测试</div><div class="test-title">当评分不存在时返回404错误</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">deleteRating 函数测试</div><div class="test-title">非作者且非管理员删除评分时返回403错误</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">deleteRating 函数测试</div><div class="test-title">数据库操作失败时返回错误</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div></div></details><details id="suite-16" class="suite-container" open=""><summary class="suite-info"><div class="suite-path">C:\job\React\sqtracker_2\group-11--pt-site-front-end\api\tests\UnitTest\controllers\wiki.test.js</div><div class="suite-time">0.414s</div></summary><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">createWiki 函数测试</div><div class="test-title">成功创建 wiki 页面</div><div class="test-status">passed</div><div class="test-duration">0.002s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">createWiki 函数测试</div><div class="test-title">非管理员访问时返回401</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">createWiki 函数测试</div><div class="test-title">slug 已存在时返回409</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">createWiki 函数测试</div><div class="test-title">缺少必要字段时返回400</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">createWiki 函数测试</div><div class="test-title">发生错误时调用next</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getWiki 函数测试</div><div class="test-title">成功获取 wiki 页面</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getWiki 函数测试</div><div class="test-title">页面不存在时返回404</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getWiki 函数测试</div><div class="test-title">未登录用户只能查看公开页面</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getWiki 函数测试</div><div class="test-title">发生错误时调用next</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">deleteWiki 函数测试</div><div class="test-title">成功删除 wiki 页面</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">deleteWiki 函数测试</div><div class="test-title">非管理员访问时返回401</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">deleteWiki 函数测试</div><div class="test-title">发生错误时调用next</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">updateWiki 函数测试</div><div class="test-title">成功更新 wiki 页面</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">updateWiki 函数测试</div><div class="test-title">非管理员访问时返回401</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">updateWiki 函数测试</div><div class="test-title">页面不存在时返回404</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">updateWiki 函数测试</div><div class="test-title">根页面不能移动到其他路径</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">updateWiki 函数测试</div><div class="test-title">slug已存在时返回409</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">updateWiki 函数测试</div><div class="test-title">缺少必要字段时返回400</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">updateWiki 函数测试</div><div class="test-title">发生错误时调用next</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div></div></details><details id="suite-17" class="suite-container" open=""><summary class="suite-info"><div class="suite-path">C:\job\React\sqtracker_2\group-11--pt-site-front-end\api\tests\UnitTest\controllers\torrent.test.js</div><div class="suite-time">0.401s</div></summary><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">embellishTorrentsWithTrackerScrape 函数测试</div><div class="test-title">处理空数组时返回空数组</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">embellishTorrentsWithTrackerScrape 函数测试</div><div class="test-title">成功添加 tracker 信息到种子数据</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">embellishTorrentsWithTrackerScrape 函数测试</div><div class="test-title">处理 tracker 中不存在的种子</div><div class="test-status">passed</div><div class="test-duration">0.003s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">embellishTorrentsWithTrackerScrape 函数测试</div><div class="test-title">处理 tracker 数据不完整的情况</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">embellishTorrentsWithTrackerScrape 函数测试</div><div class="test-title">处理错误情况时返回原始种子数据</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div></div></details><details id="suite-18" class="suite-container" open=""><summary class="suite-info"><div class="suite-path">C:\job\React\sqtracker_2\group-11--pt-site-front-end\api\tests\UnitTest\controllers\group.test.js</div><div class="suite-time">0.389s</div></summary><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">createGroup 函数测试</div><div class="test-title">成功创建组并更新所有种子</div><div class="test-status">passed</div><div class="test-duration">0.002s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">createGroup 函数测试</div><div class="test-title">空种子数组时抛出错误</div><div class="test-status">passed</div><div class="test-duration">0.011s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">createGroup 函数测试</div><div class="test-title">保存组失败时抛出错误</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">createGroup 函数测试</div><div class="test-title">更新种子失败时抛出错误</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">addToGroup 函数测试</div><div class="test-title">永真测试</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">addToGroup 函数测试</div><div class="test-title">测试findOneMock</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">addToGroup 函数测试</div><div class="test-title">测试主函数</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">addToGroup 函数测试</div><div class="test-title">成功添加种子到组</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">addToGroup 函数测试</div><div class="test-title">组不存在时抛出错误</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">addToGroup 函数测试</div><div class="test-title">种子不存在时抛出错误</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">addToGroup 函数测试</div><div class="test-title">更新组失败时抛出错误</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">removeFromGroup 函数测试</div><div class="test-title">成功从组中移除种子（组中还有其他种子）</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">removeFromGroup 函数测试</div><div class="test-title">成功从组中移除种子（组中只有这一个种子）</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">removeFromGroup 函数测试</div><div class="test-title">组不存在时抛出错误</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">removeFromGroup 函数测试</div><div class="test-title">种子不存在时抛出错误</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">removeFromGroup 函数测试</div><div class="test-title">种子不在组中时抛出错误</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">removeTorrentFromGroup 函数测试</div><div class="test-title">成功移除种子</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">removeTorrentFromGroup 函数测试</div><div class="test-title">种子不存在时返回404</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">removeTorrentFromGroup 函数测试</div><div class="test-title">用户没有权限时返回403</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">removeTorrentFromGroup 函数测试</div><div class="test-title">种子没有组时返回400</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">removeTorrentFromGroup 函数测试</div><div class="test-title">发生错误时调用next</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">findFuzzyGroupMatches 函数测试</div><div class="test-title">成功搜索并返回结果</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">findFuzzyGroupMatches 函数测试</div><div class="test-title">查询字符串太短时返回400</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">findFuzzyGroupMatches 函数测试</div><div class="test-title">没有查询字符串时返回400</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">findFuzzyGroupMatches 函数测试</div><div class="test-title">搜索结果置信度低于阈值时返回空数组</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">findFuzzyGroupMatches 函数测试</div><div class="test-title">发生错误时调用next</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div></div></details><details id="suite-19" class="suite-container" open=""><summary class="suite-info"><div class="suite-path">C:\job\React\sqtracker_2\group-11--pt-site-front-end\api\tests\UnitTest\utils\torrentScoring.test.js</div><div class="suite-time">0.374s</div></summary><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">torrentScoring &gt; calculateTechnicalScore</div><div class="test-title">should calculate perfect score for high success rate and seeders</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">torrentScoring &gt; calculateTechnicalScore</div><div class="test-title">should calculate low score for poor success rate and few seeders</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">torrentScoring &gt; calculateTechnicalScore</div><div class="test-title">should handle missing values</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">torrentScoring &gt; calculateContentScore</div><div class="test-title">should convert 5-star rating to 100-point scale</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">torrentScoring &gt; calculateContentScore</div><div class="test-title">should handle zero rating</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">torrentScoring &gt; calculateContentScore</div><div class="test-title">should handle missing values</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">torrentScoring &gt; calculateCommunityScore</div><div class="test-title">should calculate high score for active community</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">torrentScoring &gt; calculateCommunityScore</div><div class="test-title">should calculate low score for inactive community</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">torrentScoring &gt; calculateCommunityScore</div><div class="test-title">should handle missing values</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">torrentScoring &gt; bayesianAverage</div><div class="test-title">should return prior when count is 0</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">torrentScoring &gt; bayesianAverage</div><div class="test-title">should calculate weighted average correctly</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">torrentScoring &gt; bayesianAverage</div><div class="test-title">should use default values correctly</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">torrentScoring &gt; calculateTorrentScore</div><div class="test-title">should calculate complete score with all data</div><div class="test-status">passed</div><div class="test-duration">0.002s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">torrentScoring &gt; calculateTorrentScore</div><div class="test-title">should handle missing data gracefully</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">torrentScoring &gt; calculateTorrentScore</div><div class="test-title">should calculate reliability based on rating count</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div></div></details><details id="suite-20" class="suite-container" open=""><summary class="suite-info"><div class="suite-path">C:\job\React\sqtracker_2\group-11--pt-site-front-end\api\tests\UnitTest\utils\recommendation.test.js</div><div class="suite-time">0.394s</div></summary><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">Recommendation Client &gt; getPersonalizedRecommendations</div><div class="test-title">should fetch personalized recommendations successfully</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Recommendation Client &gt; getPersonalizedRecommendations</div><div class="test-title">should handle API error</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Recommendation Client &gt; getPersonalizedRecommendations</div><div class="test-title">should handle network error</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Recommendation Client &gt; getSimilarRecommendations</div><div class="test-title">should fetch similar recommendations successfully</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Recommendation Client &gt; getSimilarRecommendations</div><div class="test-title">should work without userId</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Recommendation Client &gt; getSimilarRecommendations</div><div class="test-title">should handle API error</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Recommendation Client &gt; saveUserPreferences</div><div class="test-title">should save preferences successfully</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Recommendation Client &gt; saveUserPreferences</div><div class="test-title">should handle empty response</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Recommendation Client &gt; saveUserPreferences</div><div class="test-title">should handle API error</div><div class="test-status">passed</div><div class="test-duration">0.004s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Recommendation Client &gt; recordUserBehavior</div><div class="test-title">should record behavior successfully</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Recommendation Client &gt; recordUserBehavior</div><div class="test-title">should handle API error silently</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div></div></details><details id="suite-21" class="suite-container" open=""><summary class="suite-info"><div class="suite-path">C:\job\React\sqtracker_2\group-11--pt-site-front-end\api\tests\UnitTest\utils\ratio.test.js</div><div class="suite-time">0.38s</div></summary><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">getUserRatio</div><div class="test-title">should calculate ratio correctly</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getUserRatio</div><div class="test-title">should return -1 ratio when download is 0</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getUserRatio</div><div class="test-title">should handle missing uploaded or downloaded fields</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getUserRatio</div><div class="test-title">should handle empty records</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getUserRatio</div><div class="test-title">should handle string number values</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">getUserRatio</div><div class="test-title">should round ratio to 2 decimal places</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div></div></details><details id="suite-22" class="suite-container" open=""><summary class="suite-info"><div class="suite-path">C:\job\React\sqtracker_2\group-11--pt-site-front-end\api\tests\UnitTest\setup\createAdminUser.test.js</div><div class="suite-time">0.393s</div></summary><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">createAdminUser 函数测试</div><div class="test-title">成功创建管理员用户</div><div class="test-status">passed</div><div class="test-duration">0.002s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">createAdminUser 函数测试</div><div class="test-title">管理员用户已存在时不创建新用户</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">createAdminUser 函数测试</div><div class="test-title">禁用邮件功能时不发送验证邮件</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">createAdminUser 函数测试</div><div class="test-title">创建用户时发生错误</div><div class="test-status">passed</div><div class="test-duration">0.003s</div></div></div></div></details><details id="suite-23" class="suite-container" open=""><summary class="suite-info"><div class="suite-path">C:\job\React\sqtracker_2\group-11--pt-site-front-end\api\tests\UnitTest\middleware\behaviorCollector.test.js</div><div class="suite-time">0.385s</div></summary><div class="suite-tests"><div class="test-result passed"><div class="test-info"><div class="test-suitename">Behavior Collector Middleware</div><div class="test-title">should call next() immediately</div><div class="test-status">passed</div><div class="test-duration">0.002s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Behavior Collector Middleware</div><div class="test-title">should collect torrent view behavior on successful response</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Behavior Collector Middleware</div><div class="test-title">should collect torrent download behavior</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Behavior Collector Middleware</div><div class="test-title">should collect torrent like behavior</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Behavior Collector Middleware</div><div class="test-title">should collect search behavior</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Behavior Collector Middleware</div><div class="test-title">should not collect behavior for non-2xx responses</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Behavior Collector Middleware</div><div class="test-title">should not collect behavior for unauthenticated requests</div><div class="test-status">passed</div><div class="test-duration">0.001s</div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Behavior Collector Middleware</div><div class="test-title">should handle behavior recording errors gracefully</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div><div class="test-result passed"><div class="test-info"><div class="test-suitename">Behavior Collector Middleware</div><div class="test-title">should not collect behavior for unmatched paths</div><div class="test-status">passed</div><div class="test-duration"> </div></div></div></div></details></main></body></html>